package com.shb.game;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;

/**
 * 基本布局，用于顶部栏及三个按钮的显示
 * 
 * @author greenery
 * 
 */
public class BaseLayout extends RelativeLayout {

	public BaseLayout(Context paramContext, int paramInt) {
		super(paramContext);
		LayoutInflater localLayoutInflater = (LayoutInflater) paramContext.getSystemService("layout_inflater");
		View localView1 = localLayoutInflater.inflate(R.layout.ad, null);
		LayoutParams parentLayoutParam = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
		parentLayoutParam.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
		this.addView(localView1, parentLayoutParam);
		LayoutParams childLayoutParam = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
		childLayoutParam.addRule(RelativeLayout.ABOVE, R.id.head);
		this.addView(localLayoutInflater.inflate(paramInt, null), childLayoutParam);
	}
}
